package Offer.offer2017;

/**
 * 判断一个数是否是2的整数次方
 * Created by 雷文康 on 2017/12/29.
 */
public class Test10a {
    public static void main(String[] args) {
        System.out.println(isDouble(-16));
    }

    public static boolean isDouble(int num) {
        return (num & (num - 1)) == 0;
    }
}
